Accessibility Screen Element Functionality

Accessibility screen elements have their own properties, functions, and events.

All Accessibility screen elements, including both UIA screen elements and Accessibility Element screen elements, share the same core functionality described in Accessibility Screen Element Common Properties, Functions, and Events. Specific screen elements may have their own additional functionality.

To view the functionality for a specific screen element, select it in the Screen Elements tree and navigate to the Functionality tab, as described in Viewing the Functionality of an Accessibility Screen Element in the Functionality Tab, or locate it in the ScreenPluginUIAutomation library in the Real-Time Designer Project tab, as described in Viewing the Functionality of an Accessibility Screen Element in the Library.

Viewing the Functionality of an Accessibility Screen Element in the Functionality Tab

When you select an Accessibility screen element in the Screen Elements tree, you can view its functionality in the Functionality tab.

To view the functionality of an Accessibility screen element in the Functionality tab:

  1. Select the captured Accessibility screen element in the Screen Elements tree.

  2. Click the Functionality tab.

    The Functionality tab shows the properties, functions, and events available for the selected screen element. For more information, see Using the Functionality Tab. For detailed descriptions of the available functions, see Accessibility Screen Element Common Functions.

Viewing the Functionality of an Accessibility Screen Element in the Library

You can view the functionality of an Accessibility screen element without capturing it by selecting the corresponding library in the Real-Time Designer.

To view the functionality of Accessibility screen elements in the library:

  1. Select the Project tab.

  2. Under References, expand the Library References node.

  3. Select the ScreenPluginUIAutomation library in the tree.

    The Assembly Info tab appears with information about the library.

  4. Select the Functionality tab, then select an Accessibility screen element type from the Type drop-down list.

    The element properties, functions, and events appear. For detailed descriptions of the available functions, see Accessibility Screen Element Common Functions.

Accessibility Screen Element Common Properties, Functions, and Events

The following properties, functions, and events are supported for all Accessibility screen elements, including both screen elements captured with the UIA interface (these elements have the prefix UIA or UI Automation), as well as screen elements captured with the IAccessible interface (these screen elements are always called Accessibility Element).

Accessibility Screen Element Common Properties

The following properties are supported for all Accessibility screen element types:

Property

Type

Description

Bounding Rectangle

Screen Element

Rectangle

The rectangle outlines the area where the cursor is currently hovering, which is captured as the screen element.
Enabled Boolean Indicates whether a screen element is enabled.
Exists Boolean Indicates whether a screen element exists.
Process ID Number The unique process ID number.
Text Text The value of this property very much depends on the type of the object. This is straightforward for text fields or menu items, on the other hand this property is empty for toolbar buttons and is the class id for shells. You can read the text property of a label, but you can't change it, whereas you can only set the text property of a password field, but not read it.
Visible Boolean Indicates whether a screen element is visible.
Window handle Number The window handle of the screen element.

Accessibility Screen Element Common Functions

The following functions are supported for all Accessibility screen element types:

Function

Return Type

Description

Activate And Lock Instance None Locks the screen element and makes it the active element. The screen element itself and all its parent screen elements in the hierarchy are locked.
Click None Clicks on the screen element.
Click On Point None Clicks on a point on the screen element specified by the X and Y parameters.
Destroy and Refresh None Validates the objects beginning from the level of the screen element in the hierarchy. The process destroys any object that no longer exists, and attempts to recognize new objects and all their child objects down the hierarchy.
Double Click None Double-clicks on the screen element.
Double Click On Point None Double-clicks on a point on the screen element specified by the X and Y parameters.
Get Instance By Parent CtrlPO Returns the first recognized physical object of a screen element whose enumerator (parent) has the given Window Handle value.
Get Instances List of CtrlPO Returns all recognized physical object instances of a screen element.
Locate None Locates the screen element in the Java application and frames it with a blinking red border.
Recognize Children None Recognizes the children of the screen element.
Refresh Number Validates the objects beginning from the top level in the hierarchy. The process destroys any object that no longer exists, and attempts to recognize new objects and their child objects down the hierarchy.
Right Click None Right-clicks the screen element.
Right Click On Point None Right-clicks on a point on the screen element specified by the X and Y parameters.
Send Keys None Executes a keyboard emulation script on the screen element.
Send Keys To Point None Executes a keyboard emulation script on a point on the screen element specified by the X and Y parameters.
Unlock Active Instance None Unlocks the active instance that has been locked by the Activate And Lock Instance function.
Validate Children None Validates the children of the screen element.

Accessibility Screen Element Common Events

The following events are supported for all Accessibility screen element types:

Event

Parameter

Type

Description

Created Boolean Fired when the screen element is created.
Destroyed Boolean Fired when the screen element is destroyed.

Accessibility Element

In addition to the general properties listed in Accessibility Screen Element Common Properties, Functions, and Events that are common to all Accessibility screen elements, the following additional properties and functions are available for Accessibility Element screen elements, which are screen elements captured with the IAccessible interface.

Accessibility Element Properties

In addition to the properties listed in Accessibility Screen Element Common Properties, Functions, and Events that are common to all Accessibility screen elements, the following additional property is available for Accessibility Element screen elements.

Property

Type

Description

Role Text The role of the screen element.

Accessibility Element Functions

In addition to the functions listed in Accessibility Screen Element Common Properties, Functions, and Events that are common to all Accessibility screen elements, the following additional functions are available for Accessibility Element screen elements.

Function

Return type

Description

Execute Default Action Boolean Executes the default action defined for the screen element, if a default action is supported for the specific screen element. This function returns a Boolean value of True if it was successful, else it returns False.
Get Checked State Boolean Gets the checked state of the screen element, if the specific screen element supports a checked state.
Get Read Only State Boolean Gets the read-only state of the screen element, if supported for the specific screen element supports a read-only state.
Get Selected State Boolean Gets the selected state of the screen element, if the specific screen element supports a selected state.
Select Boolean Sets the selected state of the screen element, if the specific screen element supports a selected state. This function returns a Boolean value of True if it was successful, else it returns False.

UIA Screen Element Common Properties, functions, and Events

In addition to the general properties listed in Accessibility Screen Element Common Properties, Functions, and Events that are common to all Accessibility screen elements, the following additional properties, functions, and event are available for UIA screen elements, which are screen elements captured with the Microsoft UI Automation (UIA) interface.

UIA Screen Element Common Properties

In addition to the general properties listed in Accessibility Screen Element Common Properties that are common to all Accessibility screen elements, the following additional properties are available for all UIA screen elements.

Property

Type

Description

Is Scrollable Boolean Indicates whether the screen element is scrollable.
Type Name Text Returns the name of the screen element type.

UIA Screen Element Common Functions

In addition to the general functions listed in Accessibility Screen Element Common Functions that are common to all Accessibility screen elements, the following functions are available for all UIA screen elements.

Function

Return Type

Description

Get Hscroll Position Number Gets the position of the horizontal scroll bar as a percentage value.
Get Supported Patterns Text Gets an element's internal patterns, which are useful for troubleshooting.
Get Vscroll Position Number Gets the position of the vertical scroll bar as a percentage value.
Log Element Structure None Prints the screen element data to the log file (error level).
Set Hscroll Position Boolean Sets the position of the horizontal scroll bar as a percentage value. This function returns a Boolean value of True if it was successful, else it returns False.
Set Vscroll Position Boolean Sets the position of the vertical scroll bar as a percentage value. This function returns a Boolean value of True if it was successful, else it returns False.

UIA Screen Element Common Events

In addition to the general events listed in Accessibility Screen Element Common Events that are common to all Accessibility screen elements, the following additional event is available for all UIA screen elements.

Event

Parameter

Type

Description

Property Changed Text Fired when one of the polled screen element properties is changed.

UIA Button

In addition to the general events listed in Accessibility Screen Element Common Events and UIA Screen Element Common Events that are common to all UIA screen elements, the following event is available for UIA Button screen elements.

Event

Parameter

Type

Description

Clicked Event None Fired when the button is clicked.

UIA Check Box

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following property is available for UIA Check Box screen elements.

Property

Type

Description

Checked Boolean Indicates the checked state of the Check Box.

UIA Combo Box

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following properties are available for UIA Combo Box screen elements.

Property

Type

Description

Items List of Text Returns a list of items.
Items Count Number Counts the Items from a combo box .
Select Index Number Gets or sets the selected Index of a combo box.
Select Item Text Gets or sets the selected Item of a combo box.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following functions are available for UIA Combo Box screen elements.

Function

Return Type

Description

Collapse Boolean Collapses the combo box. This function returns a Boolean value of True if it was successful, else it returns False.
Expand Boolean Expands the combo box. This function returns a Boolean value of True if it was successful, else it returns False.
Get Item Text By Index Text Gets the text of the item in the combo box specified by the index path.

UIA Data Item

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following properties are available for UIA Data Item screen elements.

Property

Type

Description

Children List Of Text Gets all the children of the data item. Children.
Selected Boolean Indicates whether a data item is selected.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following function is available for UIA Data Item screen elements.

Function

Return

Type

Description

Get Child Item

Text By Index

Text Gets the text of a child of the Data Item specified by the index path.

UIA Data Grid

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following properties are available for UIA Data Grid screen elements.

Property

Type

Description

Column Headers List of Text Returns a list of column headers.
Columns Count Number Returns the number of columns.
Row Headers List of Text Returns a list of row headers.
Rows Count Number Returns the number of rows.
Select Row List of Text Returns a list of rows selected
Select Row Index Number Gets or sets the selected row index of data grid.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following functions are available for UIA Data Grid screen elements.

Function

Return Type

Description

Get Cell Text Text Gets the text value in the cell at the specified column and row.
Get Data Table DataTable Gets the full content of the table.
Get Row By Index List of Text Gets the a list of the text from the cells in the row specified by the index path. The index numbers are one-based.
Set Cell Text Boolean Sets a text value in the cell at the specified column and row. This function returns a Boolean value of True if it was successful, else it returns False.

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following property is available for UIA Hyperlink screen elements.

Property

Type

Description

Is URL Supported Boolean Indicates whether the URL is supported or not.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following functions are available for UIA Hyperlink screen elements.

Function

Return Type

Description

Get URL Text Gets the text value of the hyperlink.
Navigate Boolean Navigates to the hyperlink. This function returns a Boolean value of True if it was successful, else it returns False.

UIA List

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following pr operties are available for UIA List screen elements.

Property

Type

Description

Has Checkboxes Boolean Indicates whether the list has checkboxes.
Items List of Text Returns a list of items.
Items Count Number Counts the Items from a list .
Selected Index Number Gets or sets the selected Index of a list.
Selected Item Text Gets or sets the selected Item of a list.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following functions are available for UIA List screen elements.

Function

Return Type

Description

Get Checked Boolean Gets the checked state of the item in the list specified by the index path.
Get Item Text Text Gets the text of the item in the list specified by the index path.
Set Checked Boolean Sets the checked state of the item in the list specified by the index path. This function returns a Boolean value of True if it was successful, else it returns False.

UIA Menu

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following property is available for UIA Menu screen elements.

Property

Type

Description

Root Items List of Text Returns a list of root items.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following functions are available for UIA Menu screen elements.

Function

Return Type

Description

Collapse Boolean Collapses the menu to the menu item specified by the menu path (menu item names separated by slashes). This function returns a Boolean value of True if it was successful, else it returns False.
Collapse All Boolean Collapses all the branches of the menu tree. This function returns a Boolean value of True if it was successful, else it returns False.
Execute Menu Action Boolean Clicks on the menu item specified by the menu path (menu item names separated by slashes). This function returns a Boolean value of True if it was successful, else it returns False.
Expand Boolean Expands the menu to the menu item specified by the menu path (menu item names separated by slashes). This function returns a Boolean value of True if it was successful, else it returns False.
Get Checked Boolean Gets the checked state of the menu item specified by the menu path (menu item names separated by slashes).
Get Children List of Text Get a list of the children of the menu item specified by the menu path (menu item names separated by slashes).
Get Enabled Boolean Gets the enabled state of the menu item specified by the menu path (menu item names separated by slashes).

UIA Radio Button

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following property is available for UIA Radio Button screen elements.

Property

Type

Description

Selected Boolean Indicates whether a data item is selected.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following function is available for UIA Radio Button screen elements.

Function

Return Type

Description

Select Boolean Selects the radio button and deselects any other radio buttons in the same group. This function returns a Boolean value of True if it was successful, else it returns False.

UIA Tab Control

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following properties are available for UIA Tab Control screen elements.

Property

Type

Description

Selected Tab Text Gets or sets the selected Tab in a tab control.
Selected Tab Index Number Gets or sets the selected Tab Index in a tab control.
Tabs List Of Text Returns a list of tabs.
Tabs Count Number Returns the number of tabs.

UIA Table

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following properties are available for UIA Table screen elements.

Property

Type

Description

Column Headers List of Text Returns a list of column headers.
Columns Count Number Returns the number of columns.
Data Items

List of Items

Returns a list of UIA table items.
Row Headers List of Text Returns a list of row headers.
Rows Count Number Returns the number of rows.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following functions are available for UIA Table screen elements.

Function

Return Type

Description

Get Cell Text Text Gets the text value in the cell at the specified column and row.
Get Data Table DataTable Gets the full content of the table by scrolling both vertically and horizontally to capture all columns and rows.
Get Row By Index List of Text Gets the a list of the text from the cells in the row specified by the index path.
Set Cell Text Boolean Sets a text value in the cell at the specified column and row. This function returns a Boolean value of True if it was successful, else it returns False.

UIA Toolbar

UIA Toolbar Properties

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following property is available for UIA Toolbar screen elements.

Property

Type

Description

Items Count Number Counts the items from an tool bar.

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following function is available for UIA Toolbar screen elements.

Function

Return Type

Description

Execute Default Action Boolean Executes the default action defined for the toolbar item specified by the index path. This function returns a Boolean value of True if it was successful, else it returns False.

UIA Tree control

In addition to the general properties listed in Accessibility Screen Element Common Properties and UIA Screen Element Common Properties that are common to all UIA screen elements, the following properties are available for UIA Tree Control screen elements.

Property

Type

Description

Root Items List of Text Returns a list of root items.
Select Item Text Selects an item

In addition to the general functions listed in Accessibility Screen Element Common Functions and UIA Screen Element Common Functions that are common to all UIA screen elements, the following functions are available for UIA Tree Control screen elements.

Function

Return Type

Description

Collapse Boolean Collapses the tree to the node specified by a path of indexes (child node indexes separated by backslashes). This function returns a Boolean value of True if it was successful, else it returns False.
Ensure Visible Boolean Ensures that the node specified by a path of indexes (child node indexes separated by backslashes) is visible. This function returns a Boolean value of True if it was successful, else it returns False.
Expand Boolean Collapses the tree to the node specified by a path of indexes (child node indexes separated by backslashes). This function returns a Boolean value of True if it was successful, else it returns False.
Find All Child Paths List of Text Finds the paths of all the children of the node specified by a path of indexes (child node indexes separated by backslashes) or the item name.
Find First Child Path Text Finds the path to the first child of the node specified by a path of indexes (child node indexes separated by backslashes) or the item name.
Find Item Path Text Finds the path to the item specified by the item name.
Get Children List of Key-Value Pairs Get a list of the children of the node specified by a path of indexes (child node indexes separated by backslashes).
Get Item Rectangle Screen Element Rectangle Get the screen element rectangle of the item specified by a path of indexes (child node indexes separated by backslashes).
Get Item Text Text Gets the text of the node specified by a path of indexes (child node indexes separated by backslashes).